package com.inspur.security.cbb3.kms.enums;

/**
 * @author: lijunchang
 * @Description: 密钥类型，对称密钥，非对称密钥等
 * @Date: 2020/10/19
 */
public enum SM2SignHashAlgorithmType {
    /**
     * 其他
     */
    OTHER,
    /**
     * RSA签名摘要算法
     */
    SHA256withSM2,
    SM3withSM2;

    public static SM2SignHashAlgorithmType getByType(String type){
        for (SM2SignHashAlgorithmType constants : values()) {
            if (constants.name().equalsIgnoreCase(type)) {
                return constants;
            }
        }
        return OTHER;
    }
}
